// Copyright © SixtyFPS GmbH <info@slint.dev>
// SPDX-License-Identifier: MIT

import { Theme } from "../theme.slint";

export component Page inherits Rectangle {
    in property <int> index;
    in property <int> current-index;
    out property <bool> active: index == current-index;

    padding-left: 14px;
    padding-right: 14px;
    x: (index - current-index) * self.width;
    width: 100%;
    height: 100%;

    animate x { duration: Theme.durations.fast; }

    GridLayout {
        padding-left: root.padding-left;
        padding-right: root.padding-right;

        @children
    }
}